<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:wh="http://java.sun.com/jsf/composite/wh"
	xmlns:p="http://primefaces.org/ui">

<ui:composition template="template/template.xhtml">
	<ui:define name="content">
		
		<h:form id="companyOverview" styleClass="horizontal_full">
			<h1>Company Financial Overview</h1>
			<p>
				On this page you can find some general information like the game name or the actual round number. 
				You can also find some information about your financial status like your current budget, the revenue, 
				the expenses and all your investments you have done. Expenses just include the costs of all the products you have sold.
				It is also possible to get some facts about your sales numbers and your actual image. 
				The image is always a number between 0 and 1. 0 is a very bad image whereas 1 is a very good image.
			</p>
		<h:panelGrid columns="2">
		<p:panel>
			<p:panelGrid columns="2" styleClass="transparentWidget">
				<f:facet name="header">
					General game information
				</f:facet>

				<h:outputLabel for="userName" value="Company-Name" />
				<h:outputText id="userName" value="#{companyMBean.user.nickname}" />

				<h:outputLabel for="gameName" value="Game-Name" />
				<h:outputText id="gameName" value="#{companyMBean.currentGame.name}" />

				<h:outputLabel for="currentRound" value="Current Round Number" />
				<h:outputText id="currentRound"
					value="#{companyMBean.actRound.roundNumber}" />
			</p:panelGrid>
			<br></br>
			<p:panelGrid columns="2" styleClass="transparentWidget">

				<f:facet name="header">
					Financial game information
				</f:facet>

				<h:outputLabel for="startBudget" value="Start Budget" />
				<h:outputText id="startBudget" value="#{companyMBean.startBudget}" />

				<h:outputLabel for="currentBudget" value="Current Budget" />
				<h:outputText id="currentBudget" value="#{companyMBean.user.budget}" />

				<h:outputLabel for="revenues" value="Revenues" />
				<h:outputText id="revenues" value="#{companyMBean.user.getRevenues()}" />

				<h:outputLabel for="expenditures" value="Expenses" />
				<h:outputText id="expenditures" value="#{companyMBean.user.getExpenses()}" />

				<h:outputLabel for="employerEducationBudget"
					value="Total Personal Investments" />
				<h:outputText id="employerEducationBudget"
					value="#{companyMBean.user.employerEducationBudget}" />

				<h:outputLabel for="marketingBudget" value="Total Marketing Investments" />
				<h:outputText id="marketingBudget"
					value="#{companyMBean.user.marketingBudget}" />

				<h:outputLabel for="rdBudget" value="Total R&amp;D Investments" />
				<h:outputText id="rdBudget" value="#{companyMBean.user.rdBudget}" />
			</p:panelGrid>
			
			<br></br>
			
			<p:panelGrid columns="2" styleClass="transparentWidget">
				<f:facet name="header">
					Sellings and image information
				</f:facet>

				<h:outputLabel for="totalSoldProducts" value="Total Sold Products" />
				<h:outputText id="totalSoldProducts"
					value="#{companyMBean.user.getAmountSoldProducts()}" />

				<h:outputLabel for="lastRoundSoldProducts"
					value="Previous Round Sold Products" />
				<h:outputText id="lastRoundSoldProducts"
					value="#{companyMBean.prevCrDecRes.getAmountSoldProducts()}" />

				<h:outputLabel for="imageValue" value="Image Value (0-1)" />
				<h:outputText id="imageValue"
					value="#{companyMBean.user.imageValue}" />

				<h:outputLabel for="imageRating" value="Image Rating" />
				<p:rating id="imageRating" value="#{companyMBean.user.getImageValueStars()}" stars="5" readonly="true" />
				
			</p:panelGrid>
			</p:panel>
			<p:panel>
				
			</p:panel>
			</h:panelGrid>
		</h:form>
	</ui:define>
</ui:composition>

</html>

